#include "ParseContext.h"

using namespace std;

namespace CExpression
{
	map<ExpressionString,int> *ParseContext::operatorPriority=0;

	map<ExpressionString,ParseContext::CreateNodeHandlerPtr> *ParseContext::createHandlerMap=0;

	map<ExpressionString,ExtensionFunction> *ParseContext::extFunctionMap=0;

	void ParseContext::IncreaseFunctionParameterCount()
	{
		this->IncreaseFunctionParameterCount(1);
	}

	void ParseContext::IncreaseFunctionParameterCount(int val)
	{
		if (this->functionParameterCount.size() > 0)
        {
            int topCount = this->functionParameterCount.top();
			this->functionParameterCount.pop();
            topCount += val;
			this->functionParameterCount.push(topCount);
        }
	}
}